package com.ctrip.ec.api.admin.service.job;

import com.ctrip.ec.biz.dao.order.OrderDao;
import com.ctrip.ec.biz.entity.order.OrderEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by jiangzy on 2018/12/21.
 */
@Service
public class CancelOrderJob implements Runnable {

    @Autowired
    private OrderDao order;

    private static final Logger logger = LoggerFactory.getLogger(CancelOrderJob.class);

    @Override
    public void run() {
        try {
            order.cancelUnpay();

        }catch (Exception ex){
            logger.error(ex.getMessage(),ex);
        }
    }
}
